package com.szz.cardecision.mapper;

import com.szz.cardecision.entity.Consultation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Optional;

@Mapper
public interface ConsultationMapper {
    int insert(Consultation consultation);
    int update(Consultation consultation);
    Optional<Consultation> findById(@Param("id") Long id);

    List<Consultation> findByUserIdOrderByCreatedAtDesc(@Param("userId") Long userId);

    List<Consultation> findAll();
}